<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	
	<!-- END RIBBON -->
	<div class="content">
		<div class="panel panel-default panel-intro">
			<div class="panel-heading">
				<div class="panel-lead">
					<em>
						数据库列表管理
					</em>
					表总数：{:count($tables)} 个
				</div>
			</div>
			<div class="panel-body">
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane fade active in" id="one">
						<div class="widget-body no-padding">
							<div class="bootstrap-table">

								<div class="fixed-table-toolbar">
									<div class="bs-bars pull-left">
										<div id="toolbar" class="toolbar">
											<a href="javascript:window.location.reload();" class="btn btn-primary btn-refresh" title="刷新">
												<i class="fa fa-refresh"></i>
                                            </a>
										</div>
									</div>
									<div class="columns columns-right btn-group pull-right">
										
										<div class="keep-open btn-group" title="列">
											<button type="button" aria-label="columns" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
												<i class="glyphicon glyphicon-th icon-th"></i>
												<span class="caret"></span>
											</button>
											<ul class="dropdown-menu" id="table_menu">
												
											</ul>
										</div>
                                        
									</div>
								</div>
								<div class="fixed-table-container">
									<div class="fixed-table-body">
										<table id="table" class="table table-striped table-bordered table-hover"
										data-operate-edit="1" data-operate-del="1" width="100%">
											<thead>
												<tr>
                                                    <th data-status="1" width="250px"><div class="th-inner">数据库名称</div></th>
                                                    <th data-status="1" width="250px"><div class="th-inner">别名</div></th>
													<th data-status="1"><div class="th-inner">编码</div></th>
													<th data-status="1"><div class="th-inner">数据量</div></th>
                                                    <th data-status="1" width="100px"><div class="th-inner">操作</div></th>
												</tr>
											</thead>
                                            
											<tbody>
                                                {volist name="tables" id="v"}
                                                <tr>
                                                    <td align="left">{$v.table}</td>
                                                    <td align="left">{$v.remark}</td>
													<td align="center">{$v.code}</td>
													<td align="center">{$v.count}</td>
                                                    <td align="center">
														{if condition="$adminController->vif('database','details')"}
															<a href="javascript:upd('{:url('database/details', ['id'=>$v['table']])}');" class="btn btn-xs btn-success btn-editone" title="预览详情">
																预览详情
															</a>
														{/if}
                                                    </td>
                                                </tr>
                                                {/volist}
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

								
<script>
layui.use(['form'], function(){
  var form = layui.form;
});

// 预览详情
function upd(href) {
	layer.open({
		type: 2,
		title: '预览数据表详情',
		shadeClose: true,
		shade: false,
		maxmin: true,
		area: ['800px', '600px'],
		content:href
	});
}

</script>
